# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-praw
_pkgname=praw
pkgver=7.6.0
pkgrel=0
pkgdesc="Python module to access to reddit's API"
options="!check" # missing 'Betamax' modules
url="https://github.com/praw-dev/praw"
arch="noarch"
license="GPL-3.0-or-later"
depends="py3-prawcore py3-update-checker py3-requests py3-six py3-websocket-client"
makedepends="py3-setuptools"
checkdepends="py3-pytest"
source="$_pkgname-$pkgver.tar.gz::https://github.com/praw-dev/praw/archive/v$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver

replaces="py-praw" # Backwards compatibility
provides="py-praw=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	pytest-3
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
6702936b193542756e1b035fc7b7e2d9c398d44bb1631046af0a06b93833c26cfdae61d58d160e27e1b56b63777eda709e6e6bee2c6e4c76451837a6eead6ac4  praw-7.6.0.tar.gz
"
